<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--view层  模板-->
<div id="app">
    <h1 v-if="ok">Yes</h1>
    <h1 v-else>No</h1>

    <h2 v-if="type === 'A'">A</h2>
    <h2 v-else-if="type === 'B'">B</h2>
    <h2 v-else-if="type === 'C'">C</h2>
    <h2 v-else>C</h2>

    <li v-for="item in items">
        {{item.message}}
    </li>

</div>

<!--1、导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
    var vm = new Vue({
        el:"#app",
        //Model：数据
        data:{
            ok: true,
            type: 'A',
            items: [
                {message: 'java'},
                {message: 'C'},
                {message: 'python'},
                {message: 'linux'},
            ]
        }
    });
</script>

</body>
</html>